﻿// <copyright file="MapInfoRegion.cs" company="QUT">
//     Copyright (c) Ninety Nine Percent. All rights reserved.
// </copyright>

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace Qut.GenerateKml.Data
{
    /// <summary>
    /// MapInfo Region class (represents a geographical region).
    /// </summary>
    public class MapInfoRegion
    {
        /// <summary>
        /// The polygons.
        /// </summary>
        private List<MapInfoPolygon> polygons;

        /// <summary>
        /// Initializes a new instance of the <see cref="MapInfoRegion"/> class.
        /// </summary>
        public MapInfoRegion()
        {
            this.polygons = new List<MapInfoPolygon>();
        }

        /// <summary>
        /// Gets or sets the pen.
        /// </summary>
        /// <value>The pen to get or set.</value>
        public string Pen { get; set; }

        /// <summary>
        /// Gets or sets the brush.
        /// </summary>
        /// <value>The brush.</value>
        public string Brush { get; set; }

        /// <summary>
        /// Gets or sets the center.
        /// </summary>
        /// <value>The center.</value>
        public PointF Center { get; set; }

        /// <summary>
        /// Gets the polygons.
        /// </summary>
        /// <returns>Returns the number of polygons.</returns>
        public List<MapInfoPolygon> GetPolygons()
        {
            return this.polygons;
        }

        /// <summary>
        /// Adds the polygon.
        /// </summary>
        /// <param name="polygon">The polygon.</param>
        public void AddPolygon(MapInfoPolygon polygon)
        {
            this.polygons.Add(polygon);
        }

        /// <summary>
        /// Gets the num polygons.
        /// </summary>
        /// <returns>Returns the number of polygons.</returns>
        public int GetNumPolygons()
        {
            return this.polygons.Count;
        }
    }
}
